﻿function cucancel()
{
 var refer = document.referrer.toLowerCase();
    if(refer=="")
    {
        top.location = "/Course/";
    }    
    else
    {
        window.location.href = refer;
    }
}
function savelesson()
{
showProgressBar(true);
$("ErrorDesc").style.display = "none";
 var valDesc = "";//内容    
try{valDesc=FCKeditorAPI.GetInstance('txtDesc').GetXHTML(true);}catch(e){} 

if(!$ValidButton$()||valDesc.length<3 || valDesc.length>9999)
{
    if(valDesc.length<3 || valDesc.length>9999)
    {
        $("ErrorDesc").style.display = "";
    }
    
    showProgressBar(false);
    return;
}

//alert($('CourseText').value+',!'+valDesc+',@'+$('selLanguageLearn').value+',#'+level+',$'+baselanguage+',%'+license+',^'+longtime+',&'+price+',*'+varTags);
     WebServices.User.Teach.UpdateLession(cid,lid,$('LessonText').value,valDesc,onsucc);
    
}
function onsucc(result)
{
showProgressBar(false);
   if(result)
   {
     top.location="/lession/"+cid;
   }else
   {
     alert('ssss');
   } 
}